import axios from '@/utils/http';
import base from './base';
import qs from 'qs';

const userInfo = {
    login(params) {
        return axios.post(base.baseURL + '/login', qs.stringify(params));
    },
    onsubmitTable(params) {
        return axios.post(base.baseURL + '/insertRecord', params);
    },
    modifyPsw(params) {
        return axios.post(base.baseURL + '/pswchange', qs.stringify(params));
    },
    requestActivites(params) {
        return axios.post(base.baseURL + '/findProjectsName', qs.stringify(params));
    },
    requestWritePageData(params) {
        return axios.post(base.baseURL + '/findRecord', qs.stringify(params));
    },
    requestDepartments(params) {
        return axios.post(base.baseURL + '/findDepartments', qs.stringify(params));
    },
    requestProjectData(params) {
        return axios.post(base.baseURL + '/findRecordByProject', qs.stringify(params));
    },
    requestUsers(params) {
        return axios.post(base.baseURL + '/findUserAndDepartment', qs.stringify(params));
    },
    requestIndividualData(params) {
        return axios.post(base.baseURL + '/findRecordByUser', qs.stringify(params));
    },

    insertUser(params) {
        return axios.post(base.baseURL + '/insertUser', qs.stringify(params));
    }
    // sendRequest(params) {
    //     return axios.post(base.baseURL + '/', params);
    // },
}

export default userInfo;